****************************************************************************
* File-Nale: 		chicago2006_au.do
* Date:		 04/30/2018
* Author: 		Fred Batista
* Purpose: 		individual level analyses of knowledge
* Data used: 		chicago2006_au.dta
* Data Output:	Journal of Politics� paper	*/
****************************************************************************

*Gender- Q31
*Age- Q32
*Interest in Australia international relations - Q35
*Knowledge - Q68, Q69, Q70, 
*Income - Q86
*Education - Q87
*Employment Status - Q88
*Weight - Q144

* Recodes

gen man = 2 - Q31

gen woman= 1- man

gen age = Q32

gen age_sq = age*age

gen interest = Q35

recode interest (1=2) (2=1) (3=0) (4=.)

gen income = Q86

recode income (9=.)

gen education = Q87

gen housewife = Q88

recode housewife (4=1) (else=0)

gen weight = Q114

* knowledge items

gen indonesia = Q68

recode indonesia (1 2 3 4=1) (else=0)

gen euro = Q69

recode euro (1=1) (else=0)

gen annan = Q70

recode annan (1=1) (else=0)

gen indonesia2 = Q68

recode indonesia2 (1 2 3 4=2) (5=1) (6=0)

gen euro2 = Q69

recode euro2 (1=2) (2=1) (3=0)

gen annan2 = Q70

recode annan2 (1=2) (2=1) (3=0)


* ANALYSES

***item analyses

* discrimination

alpha indonesia euro annan

* difficulty

summarize Indonesia euro annan [aweight=weight]

*** Models

* Indonesian President

khb probit indonesia man || income education age age_sq interest housewife [pweight=weight]

probit indonesia man income education age age_sq interest housewife [pweight=weight]

mlogit indonesia2 woman income education age age_sq interest housewife [pweight=weight], base(2)


* Euro

khb probit euro man || income education age age_sq interest housewife [pweight=weight]

probit euro man income education age age_sq interest housewife [pweight=weight]

mlogit euro2 woman income education age age_sq interest housewife [pweight=weight], base(2)


* Koffi Annan

khb probit annan man || income education age age_sq interest housewife [pweight=weight]

probit annan man income education age age_sq interest housewife [pweight=weight]

mlogit annan2 woman income education age age_sq interest housewife [pweight=weight], base(2)


